//统一管理品牌管理相关的接口
import request from '@/utils/request'
import type {TradeMark, TradeMarkResponseData} from "@/api/product/type";
import {da} from "element-plus/es/locale";

//品牌管理相关的请求地址
enum API {

    ALL_BANNER_LIST_URL = '/admin/product/baseTrademark/getTrademarkList',

    PAGE_BANNER_LIST_URL = '/admin/product/baseTrademark/',

    BANNER_DELETE_URL = '/admin/product/baseTrademark/remove/',

    BANNER_UPDATE_URL = '/admin/product/baseTrademark/update',

    BANNER_SAVE_URL = '/admin/product/baseTrademark/save',

}

// 品牌增加reqBannerSave
export const reqBannerSave = (data: TradeMark) =>
    request.post<any, any>(API.BANNER_SAVE_URL, data)

// 品牌删除reqPageBannerList
export const reqBannerRemove = (id: Number) =>
    request.delete<any, any>(API.BANNER_DELETE_URL + id)

// 修改增加reqBannerUpdate
export const reqBannerUpdate = (data: TradeMark) =>
    request.put<any, any>(API.BANNER_UPDATE_URL, data)

//获取品牌分页列表
export const reqPageBannerList = (page: Number, limit: Number) =>
    request.get<any, TradeMarkResponseData>(API.PAGE_BANNER_LIST_URL + `${page}/${limit}`)

